home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / a_man / cat1 / rmt.z / rmt
Encoding:
Text File  |  2002-10-03  |  7.4 KB  |  199 lines

  1.  
  2.  
  3.  
  4. RRRRMMMMTTTT((((1111MMMM))))                                                                RRRRMMMMTTTT((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      rmt - remote magtape protocol module
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ////eeeettttcccc////rrrrmmmmtttt
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      _R_m_t is a program used by the remote programs in manipulating a magnetic
  16.      tape drive through an interprocess communication connection.  _R_m_t is
  17.      normally started up with an _r_e_x_e_c(3N) or _r_c_m_d(3N) call.
  18.  
  19.      The _r_m_t program accepts requests specific to the manipulation of magnetic
  20.      tapes, performs the commands, then responds with a status indication.
  21.      All responses are in ASCII and in one of two forms. Successful commands
  22.      have responses of:
  23.  
  24.           AAAA_n_u_m_b_e_r\n
  25.  
  26.      where _n_u_m_b_e_r is an ASCII representation of a decimal number.
  27.      Unsuccessful commands are responded to with:
  28.  
  29.           EEEE_e_r_r_o_r-_n_u_m_b_e_r\n_e_r_r_o_r-_m_e_s_s_a_g_e\n
  30.  
  31.      where _e_r_r_o_r-_n_u_m_b_e_r is one of the possible error numbers described in
  32.      _i_n_t_r_o(2), and _e_r_r_o_r-_m_e_s_s_a_g_e is the corresponding error string as printed
  33.      from a call to _p_e_r_r_o_r(3).  The protocol is comprised of the following
  34.      commands (a space is present between each token):
  35.  
  36.      OOOOddddeeeevvvviiiicccceeee\\\\nnnnmmmmooooddddeeee\\\\nnnn
  37.                     Open the specified _d_e_v_i_c_e using the indicated _m_o_d_e.
  38.                     _D_e_v_i_c_e is a full pathname and _m_o_d_e is an ASCII
  39.                     representation of a decimal number suitable for passing to
  40.                     _o_p_e_n(2).  If a device had already been opened, it is
  41.                     closed before a new open is performed.
  42.  
  43.      VVVVvvvveeeerrrrssssiiiioooonnnn####\\\\nnnn    This command is sent by the client program to indicate the
  44.                     _v_e_r_s_i_o_n# of the 'librmt' library that the client program
  45.                     is linked with. If rrrrmmmmtttt own protocol is the same or  more
  46.                     advanced than that of the client program, rrrrmmmmtttt will adjust
  47.                     to the client program protocol and return the client
  48.                     _v_e_r_s_i_o_n# . However, if the client program _v_e_r_s_i_o_n# is more
  49.                     advanced than rrrrmmmmtttt own protocol version number then rrrrmmmmtttt
  50.                     will return its actual version number and expect the
  51.                     client program to adjust to rrrrmmmmtttt protocol.  The returned
  52.                     value is the ASCII representation of the version number.
  53.  
  54.      CCCCddddeeeevvvviiiicccceeee\\\\nnnn      Close the currently open device.  The _d_e_v_i_c_e specified is
  55.                     ignored.
  56.  
  57.      LLLLwwwwhhhheeeennnncccceeee\\\\nnnnooooffffffffsssseeeetttt\\\\nnnn
  58.                     Perform an _l_s_e_e_k(2) operation using the specified
  59.                     parameters.  The response value is that returned from the
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. RRRRMMMMTTTT((((1111MMMM))))                                                                RRRRMMMMTTTT((((1111MMMM))))
  71.  
  72.  
  73.  
  74.                     _l_s_e_e_k call.
  75.  
  76.      WWWWccccoooouuuunnnntttt\\\\nnnn       Write data onto the open device.  _R_m_t reads _c_o_u_n_t bytes
  77.                     from the connection, aborting if a premature end-of-file
  78.                     is encountered.  The response value is that returned from
  79.                     the _w_r_i_t_e(2) call.
  80.  
  81.      RRRRccccoooouuuunnnntttt\\\\nnnn       Read _c_o_u_n_t bytes of data from the open device.  If _c_o_u_n_t
  82.                     exceeds the size of the data buffer (10 kilobytes), it is
  83.                     truncated to the data buffer size.  _R_m_t then performs the
  84.                     requested _r_e_a_d(2) and responds with AAAA_c_o_u_n_t-_r_e_a_d\n if the
  85.                     read was successful; otherwise an error in the standard
  86.                     format is returned.  If the read was successful, the data
  87.                     read is then sent.
  88.  
  89.      IIIIooooppppeeeerrrraaaattttiiiioooonnnn\\\\nnnnccccoooouuuunnnntttt\\\\nnnn
  90.                     Perform a MTIOTOP _i_o_c_t_l(2) command using the specified
  91.                     parameters.  The parameters are interpreted as the ASCII
  92.                     representations of the decimal values to place in the
  93.                     _m_t__o_p and _m_t__c_o_u_n_t fields of the structure used in the
  94.                     _i_o_c_t_l call.  The return value is the _c_o_u_n_t parameter when
  95.                     the operation is successful.
  96.  
  97.      SSSS\\\\nnnn            Return the status of the open device, as obtained with a
  98.                     MTIOCGET _i_o_c_t_l call.  If the operation was successful, an
  99.                     ``ack'' is sent with the size of the status buffer, then
  100.                     the status buffer is sent (in binary).
  101.  
  102.      QQQQ\\\\nnnn            Perform a MTSCSIINQ _i_o_c_t_l(2) command. If the operation was
  103.                     successful, an ``ack'' is sent with the size of the
  104.                     inquiry buffer, then the inquiry buffer is sent (in
  105.                     binary).
  106.  
  107.      BBBB\\\\nnnn            Perform a MTIOCGETBLKSIZE _i_o_c_t_l(2) command.  If the
  108.                     operation was successful, an ``ack'' is sent with the size
  109.                     of the block size buffer, then the block size buffer is
  110.                     sent (in binary).
  111.  
  112.      ZZZZ\\\\nnnn            Perform a _f_s_t_a_t(2) system call on the currently opened
  113.                     device.  If the operation was successful, an ``ack'' is
  114.                     sent with the size of the ``stat'' structure, then the
  115.                     actual ``stat'' structure is sent (in binary).
  116.  
  117.      Any other command causes _r_m_t to exit.
  118.  
  119. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  120.      All responses are of the form described above. If rrrrmmmmtttt is invoked with an
  121.      argument, that argument will be treated as a file name and debug
  122.      information will be logged in that file.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. RRRRMMMMTTTT((((1111MMMM))))                                                                RRRRMMMMTTTT((((1111MMMM))))
  137.  
  138.  
  139.  
  140. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  141.      rcmd(3N), rexec(3N), mtio(7),
  142.  
  143. BBBBUUUUGGGGSSSS
  144.      People tempted to use this for a remote file access protocol are
  145.      discouraged.
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.